Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Open local html files in Fenix #7546

Closed
1 task
liuche opened this issue Jan 8, 2020 · 64 comments
Closed
1 task

Open local html files in Fenix #7546

liuche opened this issue Jan 8, 2020 · 64 comments
Labels
E5 Estimation Point: about 5 days feature request 🌟 New functionality and improvements

Comments

@liuche
Copy link
Contributor

liuche commented Jan 8, 2020

Why/User Benefit/User Problem

Users might want to open html files on Fenix in the mobile browser.

What/Requirements

  • Handle the intent filters for filetypes
  • Can talk to @snorp for any questions about Gecko

Acceptance Criteria (how do I know when I’m done?)

  • can open a local html file without "unknown protocol error"

┆Issue is synchronized with this Jira Task

@liuche liuche added feature request 🌟 New functionality and improvements should labels Jan 8, 2020
@liuche liuche added this to Prioritized Feature Backlog in Fenix Sprint Kanban Jan 8, 2020
@Dunexus
Copy link

Dunexus commented Jan 9, 2020

Does this mean #4049 isn't won't fix anymore ? 😃

@vesta0 vesta0 added E5 Estimation Point: about 5 days and removed feature request 🌟 New functionality and improvements labels Jan 14, 2020
@sblatz sblatz self-assigned this Jan 14, 2020
@buttercookie42
Copy link

Hooray indeed, although sadly the direction Google has been moving in (apps should only use content://-URIs when launching other apps, meaning for us that you cannot open any of the other local resources possibly referenced by the HTML file pointed to by the received Intent, and now the deprecation of conventional file system access in Android 10 on top) is still endangering the long-term viability of being able to properly access local HTML files.

@sblatz sblatz removed their assignment Jan 31, 2020
@vesta0 vesta0 removed this from Prioritized Feature Backlog in Fenix Sprint Kanban Feb 10, 2020
@vesta0 vesta0 added feature request 🌟 New functionality and improvements and removed should labels Mar 29, 2020
@vesta0 vesta0 added this to Theme: Content in Fenix Feature Requests Apr 18, 2020
@vesta0 vesta0 moved this from Theme: Content to Make it seamless & delightful to consume content in Fenix Feature Requests Apr 21, 2020
@rbrule
Copy link

rbrule commented May 12, 2020

Browsing local files and opening HTML files works on my machine, with a small twist.

Write file:///storage/emulated/0/ on your address bar and notice the ///. If you don't write the /// your address bar will display it for you but it will show an error, even if you refresh the page. So make sure to have the /// on the first try, or else open a new tab.

Furthermore, once you have an HTML file opened, if you add it to your home screen, it won't be able to open it.

I use the lastest standard Firefox Preview from the Play Store on a Pixel 2 with Android 10.

Can anyone else confirm this behaviour on their device?

(Might be relevant for #4049 that is currently closed)

@AgentOak
Copy link

AgentOak commented Sep 2, 2020

@rbrule Yes thank you! That URL works for me on the current stable 79.0.5 release (on Android 9). You just saved me from a very boring train ride with nothing to read. As a usability tip, after visiting file:///storage/emulated/0/ add it to the top sites so you can access it quickly and don't have to type the URL. It will show up as "Index of..." and icon only showing the letter "S".

I'm using this workaround for now, even though it is inconvenient that I cannot use my usual file manager app to browse.
There are a lot of UX issues as well, e.g. the lock icon showing insecure connection and the file list clearly not being intended for touch use.

@richardp345
Copy link

I've read through the associated bug reports and the upstream issues filed with Google and understand the difficulty. However, although it will fail to properly load local HTML files with local child content using the content:// scheme, Chrome still shows up as a viewer on Android for local HTML files and if the file has no child content it will load just fine. Since FF 80 on Android, FF doesn't even show up as a viewer. The content scheme was supported before, following https://bugzilla.mozilla.org/show_bug.cgi?id=1406903. Could we please have what we had before?

@Mugurell
Copy link
Contributor

Mugurell commented Feb 1, 2021

This could be reconsidered in the future but for now Fenix will not support loading file:// anymore.
Let's keep this feature request open to reconsider the opportunity of this later.

@lollita
Copy link

lollita commented Feb 1, 2021

I would like too this feature.

@Kakitoru
Copy link

Kakitoru commented Feb 2, 2021

This could be reconsidered in the future but for now Fenix will not support loading file:// anymore.

Fenix was released long before it had feature parity with Fennec. It still doesn't, several releases later.

There are outstanding bugs in fundamental, basic browser functions like, say, downloading -- look at the list of issues there, I'm hit myself with one that I've been reporting with logs for months and can't download without a browser crash since version 82.x ... No one has even looked at the issue months later. Why report anything ? This is not an obscure issue -- I even suggested how to fix it, was ignored, meanwhile for months I have to turn to Chromium or terminal to download anything on Android, it's absurd.

With this last move removing in 85 the file:/// workaround for local browsing, me and my co-workers can't test offline documents on Android devices before moving them to production, open any local media files, or use our company's local wiki in-device.

I have been preaching for and promoting Firefox since it exists, but at this point it's painfully clear I'm in denial. I can't use it for anything right now.

Why are you doing all this ? I ask in earnest, do any of the current developers even use Fenix for anything other than browsing Facebook or Instagram these days ?

Edit : cadeyrn, you're extremely quick to give a thumbs down but why don't you comment instead ? Put yourself in my shoes. In our company we use TiddlyWiki among others, locally. A lot. How do you suggest we do that now in Android ? There is no other application but a browser to use a wiki. It is purposely made to be opened in a browser. These are not documents we can or want to put online. The only option is using another browser. In fact, ANY other Android browser, as Firefox is the only one that incomprehensively removes a fundamental browser function.

Edit 2 : I honestly, seriously, ask in earnest what current developers use Fenix for, daily, if they do. Just uninstalled Fenix and tried the last Fennec that was released to see if I am being dramatic. The answer is no. I know better than to run an outdated browser lacking vulnerability fixes, but the regression path of Fenix by comparison is shocking. Add-ons work in Fennec, so does downloading, opening local files, viewing source, anchor links, and the list goes on and on and on. List of essential functions that define what a browser is and are gone or broken in Fenix. Fennec gave any Chromium-based browser a run for its money. How on Earth is Fenix now this broken and more and more so with each decision like the one we're discussing here ? It makes no sense.

@Crandel
Copy link

Crandel commented Feb 2, 2021

This was last point for me to switch to vivaldi. I have a great collection of local html files. I see no point to use firefox anymore. Your product management total sucks

@mohibo
Copy link

mohibo commented Feb 4, 2021

that's why i stayed with firefox 68.12.Because it was more usable

@pphotography
Copy link

I got several HTML documents on my phone which are bookmarked using file:///... links. Since today I cannot access these files anymore with Firefox mobile.
This workaround using file:///... link instead of showing a "open with Firefox" from the file manager was cumbersome, but now even this workaround is gone without any notification.

@RFDAJE
Copy link

RFDAJE commented May 4, 2022

A workaround is to access those local html files via a local webserver. https://play.google.com/store/apps/details?id=jp.ubi.common.http.server (from https://android.stackexchange.com/questions/220400/local-files-revisited-opening-local-html-files-file-path-to-file-in-chrome ) Life would be a bit easier without having to do so.

This software is very easy to use. Thank you, but arm will not support 32-bit applications in the future. This software has not been updated for a long time. What should we do when arm only supports 64 bit applications in the future?

  • install termux on android
  • install python in termux
  • run python -m http.server --directory /any/dir/ in termux nix
  • open http://0.0.0.0:8000 in browser

@karam72
Copy link

karam72 commented May 4, 2022

This is unacceptable. Not opening local files... At least it can be a config on about:config.

@JJRcop
Copy link

JJRcop commented Jun 19, 2022

I am on the "Fennec F-Droid" build of Fenix, so I was able to install this lovely extension to translate web pages directly in the DOM since I am learning another language, but sometimes need the extra help https://addons.mozilla.org/en-US/firefox/addon/traduzir-paginas-web/

It's quite a shame that I can't use it directly on offline webpages since I have to use the Android HTML viewer, and not Fenix.

I am very supportive of this feature returning to fenix.

@Manuel-K
Copy link

I'd never have thought that this was possible in my wildest dreams. I just bought a tablet to view local html files in firefox with lots of custom programming and now I feel that I have wasted my money.

It is very disappointing that there isn't even a hidden toggle in about:config to mitigate this issue.

@artisticfox8
Copy link

I'd never have thought that this was possible in my wildest dreams. I just bought a tablet to view local html files in firefox with lots of custom programming and now I feel that I have wasted my money.

It is very disappointing that there isn't even a hidden toggle in about:config to mitigate this issue.

As others have said, you can at least view the files using a local server for now

@Manuel-K
Copy link

As others have said, you can at least view the files using a local server for now

Unfortunately the tablet uses Android 12, so Termux does not work correctly due to its processes getting killed.

@RokeJulianLockhart
Copy link

The file:// URI scheme is entirely unavailable for me via Fennec.

@artisticfox8
Copy link

As others have said, you can at least view the files using a local server for now

Unfortunately the tablet uses Android 12, so Termux does not work correctly due to its processes getting killed.

I use Android 12 too and the Fdroid build works

@Manuel-K
Copy link

I use Android 12 too and the Fdroid build works

Good to know. There were so many discouraging reports that I didn't want to try it after the many disappointments and the constant jumping through an ever increasing number of hoops. In the meantime, I was able to return the tablet and have received my money back.

@OmlineEditor
Copy link

add the ability to open links directly from the drive: file:///storage/emulated/0/temp/index.html
all good browsers are able to do this. your browser is good and should do it too. it has already been 2 years since the ticket was opened. please implement this.

@bowknot
Copy link

bowknot commented Jul 7, 2022

I suspect that Firefox has Google's insiders, and Android Software is getting worse, just like Nokia had Microsoft's insiders at the beginning

@robsmith11
Copy link

It really is strange that Mozilla won't at least give a reason why they refuse to implement this popular feature. So much for an "open" organization. Their silence is only going to encourage suspicion.

@karam72
Copy link

karam72 commented Jul 7, 2022

I can not say anything if Mozilla is decided to not open local files as default. But it is not acceptable that they not allowed to advanced user (with an about:config setting).

Please everyone use "Fennec F-droid" and other alternatives (especially from here: privacyguides.org). So maybe Mozilla can see why people are leaving it... There is nothing I can do.

@bk322
Copy link

bk322 commented Jul 21, 2022

Another workaround is to keep an outdated version of firefox just to read local html files.

For this:

  1. uninstall firefox via google play

  2. download apk of outdated firefox which allows to open local html files:

    (in both cases you probably want aarch64 version)

  3. install apk by clicking on it, for example, via file manager

  4. grant firefox access to storage:

    • Android 9: Android Settings -> Apps -> Permissions -> Storage
    • Android 12: Android Settings -> Privacy -> Permissions manager -> Files and media
  5. turn off auto-update of firefox via google play

  6. Bonus: install "Fennic F-Droid" from F-Droid to use as your default web browser: https://f-droid.org/en/packages/org.mozilla.fennec_fdroid

Works for me on Android 12 phone and Android 9 tablet.

@Anutrix
Copy link

Anutrix commented Aug 26, 2022

Still waiting for this. Also, it works on Android Chrome so it's not like it's blocked as a web/android standard decision.

@vehosah
Copy link

vehosah commented Sep 3, 2022

And two years later and no updates at all

@pgorod
Copy link

pgorod commented Sep 20, 2022

After investing in Firefox, designing company processes, add-ons, etc., a couple of years ago we saw that Firefox had been crippled and had to pull back to Firefox 68 to keep the work going on as normal.

No explanation was given, to this day. No estimate of when (or if) this will be fixed so that Firefox can adequately be called a "Browser" again.

This was a spectacularly wrong decision by someone at Mozilla, and it seems there is no ability to backtrack on a spectacularly wrong decision at Mozilla, which is a shame.

This is done in the name of security, but real-world security is necessarily a trade-off between practicality and risks; so, in practice, right now it's about a work-force (I won't say which company) all riddled with insecure Firefox 68 (for ever?). We could take the costs and redo the whole thing differently. And then on the next day Mozilla could wake up, solve this blunder and we would look like idiots.

How wrong I was, years ago, when I explained to management that this would surely be solved quickly because it was incredibly wrong and inconsistent...

@birdie-github
Copy link

Firefox can save files locally but cannot open them?

Android allows to use the API to open files instead of accessing /sdcard via MANAGE_EXTERNAL_STORAGE which completely negates any possible security implications.

This bug will soon be three years old.

Looks like Mozilla is slowly winding down its operations considering all the important for the user features are neglected.

Oh, and the list of allowed add-ons for mobile Firefox has never been updated since it was introduced three years ago.

@Mugurell
Copy link
Contributor

Mugurell commented Oct 7, 2022

Oh, and the list of allowed add-ons for mobile Firefox has never been updated since it was introduced three years ago.

Firefox Beta will get support for more addons starting with the next version - 107 - #26948.

@pgorod
Copy link

pgorod commented Oct 7, 2022

Why is this labeled as a "Feature request"? This is a bug, and a nasty one. Basic browser functionality that was there was broken in a carelessly considered "security" decision. Countless users have been complaining that their legitimate Firefox uses have been crippled by this decision.

Nobody is asking for new features here. To fix this, nobody will have to produce new code, they'll just have to remove the code that was introduced to block the pre-existing feature. Firefox v0.1 could browse local files...

I respectfully request the people with the required permissions to re-label this correctly. Thanks!

@birdie-github
Copy link

Comments like yours invariably lead to bug reports/feature requests being locked to Mozilla employees only. It doesn't matter how this report is classified, as someone high up in the rankings believes this is "wrong" and doesn't need to be fixed at all. Let it be. Maybe that senior manager one day will be in a situation when opening local files is absolutely necessary and suddenly this bug will be solved in an instant (yeah, exactly, an Android coder could add this feature in under an hour at most).

@mortyobnoxious
Copy link

mortyobnoxious commented Oct 26, 2022

This issue has been open for:
image

@kbrosnan
Copy link
Contributor

As part of #26855 this report has been moved to Bugzilla as bz-1806171

@kbrosnan kbrosnan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 16, 2022
@Rangtian
Copy link

Alas... How I wish I could view SVG files on Android with Firefox...

@Anutrix
Copy link

Anutrix commented Dec 29, 2022

Alas... How I wish I could view SVG files on Android with Firefox...

Forget SVG. If they at least allowed basic HTML, which is supported on most mobile browsers. I wonder if the devs realize what message, a browser that says it can't support basic web stack bits locally, sends to general public.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
E5 Estimation Point: about 5 days feature request 🌟 New functionality and improvements
Projects
No open projects
Fenix Feature Requests
Make it seamless & delightful to ...
Development

No branches or pull requests